import { EChartsOption } from 'echarts'

export const option: EChartsOption = {
  tooltip: {
    trigger: 'item',
    formatter: (params: any) => {
      return params.marker + ' ' + params.name + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>' + params.value + '</b>'
    }
  },
  visualMap: {
    type: 'piecewise',
    top: 'top',
    pieces: [
      { gte: 201 },
      { gte: 101, lte: 200 },
      { gte: 51, lte: 100 },
      { gte: 21, lte: 50 },
      { gte: 11, lte: 20 },
      { gte: 6, lte: 10 },
      { gte: 1, lte: 10 }
    ],
    inRange: {
      color: ['lightskyblue', 'yellow', 'orangered']
    },
    outOfRange: {
      color: '#eee'
    }
  },
  series: {
    name: '区域分布',
    type: 'map',
    map: '内蒙古',
    zoom: 1.15,
    // roam: true, // 缩放和平移
    emphasis: {
      // 圆的阴影
      itemStyle: {
        shadowBlur: 10,
        shadowOffsetX: 0,
        shadowColor: 'rgba(0, 0, 0, 0.5)'
      }
    },
    data: []
  }
}
